<?php
/*
 * Created on 2009-7-19
 *
 * Author: guobin@yizin.net
 */
global $header;
global $footer;
global $menu;

global $userIds;
global $roleId;
global $from;
global $error;


global $featureManager;
$header['title'] = ($from == 'user'?'设置角色':'设置用户') . ' - 用户管理';
$header['head'] = '';
$featureManager->apply("com.yizin.platform.admin.header", $header);
$menu['current'] = $from == 'user'?'user.user':'user.role';
$featureManager->apply("com.yizin.platform.admin.menu", $menu);
$featureManager->apply("com.yizin.platform.admin.footer", $footer);

?>
<?= $header['html'] ?>
<div class="ysi-container-C">
    <div class="ysi-container-CI">
        <div>
            <?php
            if ($from == 'user')
            {
            ?>
            <a href="<?=REQUEST_BASE?>admin/user/user/">&lt;&lt;返回用户管理</a>
            <?php
            }
            else
            {
            ?>
            <a href="<?=REQUEST_BASE?>admin/user/role/">&lt;&lt;返回角色管理</a>
            <?php
            }
            ?>
        </div>
        <form class="ysi-form ysi-form-w6" action="<?=REQUEST_BASE?>admin/user/role/grant/" method="post">
            <fieldset>
      <div class="ysi-form-row">
        <div class="ysi-form-label"><label for="username">用户名</label></div>
        <div class="ysi-form-field"><input type="text" name="userIds" value="<?=$userIds?>" /><span class="ysi-form-error"><?= $error['userIds'] ?></span><br/><span class="ysi-form-note">可填写多个，以半角逗号分隔</span></div>
        <div class="clear"></div>
      </div>
      <div class="ysi-form-row">
        <div class="ysi-form-label"><label for="email">角色ID</label></div>
        <div class="ysi-form-field"><input type="text" name="roleId" value="<?=$roleId?>"><span class="ysi-form-error"><?= $error['roleId'] ?></span><br /><span class="ysi-form-note">1-20字符</span></div>
        <div class="clear"></div>
      </div>
      <div class="ysi-form-row">
        <div class="ysi-form-label"><label for="password">说明</label></div>
        <div class="ysi-form-field"><textarea name="description"><?=$description?></textarea><span class="ysi-form-error"><?=$error['description']?></span><br /></div>
        <div class="clear"></div>
      </div>
			<div class="ysi-form-row ysi-form-indent">
        <div class="ysi-form-field">
          <input class="ysi-form-submit" type="submit" value="提交" /><input type="hidden" name="from" value="<?=$from?>" />
        </div>
      </div>
    </fieldset>
	<div class="clear-1"></div>
        </form>
    </div>
</div>
<div class="ysi-container-L">
    <?= $menu['html'] ?>
</div>
<?= $footer['html'] ?>
